package org.example.teachermall04.service;

import org.example.teachermall04.entity.Address;
import org.example.teachermall04.mapper.AddressMapper;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressService {
    @Autowired
    private AddressMapper addressMapper;

    public List<Address> getAllAddresses(Integer userId) {
        return  addressMapper.getAllAddresses(userId);
    }

    public Address getAddressById(Integer addressId) {
        return  addressMapper.getAddressById(addressId);
    }
}
